unit cmdSetLayerVisibleOff;

interface

uses  classes, sysutils
    , nativeXml
    , appMappldXmlNode
    , appMappldXmlCommand
    , appMappldTypes
    , appMappldXmlContext
    , appMappldXmlLayer
;

type
    {------------------------------ TCmdSetLayerVisibleOff }

    {***************************************************************************
    * TCmdSetLayerVisibleOff
    ***************************************************************************}
    TCmdSetLayerVisibleOff = class( TMappldXmlCommand )
protected
    procedure   internalProccess(); override;
    end;

implementation

{*******************************************************************************
* internalProccess
*******************************************************************************}
procedure TCmdSetLayerVisibleOff.internalProccess();
var
    layer : TMappldXmlLayer;

begin
    layer := FxmlContext.layersByCode[ FxmlNode.ValueAsString ];
    if ( layer = nil ) then
    begin
        exit;
    end;

    layer.flVisible := false;
end;

initialization

TMappldXmlCommand.registerCommandByCode( XML_CMD_SetLayerVisibleOff, TCmdSetLayerVisibleOff );

end.
